/*************************************************************************
    > File Name: AccountItem_test_003.cpp
    > Author: skylon
    > Site: blog.csdn.net/tcm_zhangpeng
    > Created Time: 2016年05月15日 星期日 17时25分42秒
 ************************************************************************/

#include"AccountItem.h"
/*
 *	Read the account information from the file and display it on the screen.
 *
 */
int main()
{
	ifstream InStream("Account.in");	//	open the file you want read
	vector<AccountItem> AllItems(100);
	short i;
	short AccountbookCount;
	
	for (i = 0; i < 100; i++)	//	read file
	{
		AllItems[i].Read(InStream);
		if (InStream.fail() != 0)
			break;
	}
	AccountbookCount = i;
	for (i = 0; i < AccountbookCount; i++)	//	display on the screen
	{
		cout << endl;
		AllItems[i].Display();
	}

	return 0;
}
